[LANGUAGE english; PARENT keywords; PAGE 11-98]
[C;6;B]		Scripts supplied with lk
[J;1;N]
  Rather than always think on how to do this and that, lk \
development system is given with some useful scripts. You \
can modify then as required and create you own scripts.
  The scripts given with lk have the 's' flag set. You \
set that flag with your CLI instruction:
[B]        PROTECT <filename> +S
[B]This flag prevent the usage of the EXECUTE intruction \
every time you call a script.

  There is a list of the available scripts:
[L;3]
[GOTO strip]		    strip
[GOTO fd2lib]		    fd2lib
[GOTO fd2offset]	    fd2offset
[J]
[LABEL strip][B;5]  . strip <source> <destination>
[B;1]
  This script will ask to lk to load a file (which \
has to be an executable) and save that file without \
any kind of debug. All debugs, symbols and advisory \
hunks are suppressed. The organization of the hunks \
will remains the same.

[LABEL fd2lib][B;5]  . fd2lib
[B;1]
  Creates a library or a header file with the function \
names defined within a description ('.fd') file.
[INDENT 6]
   1. ASM

        You can ask for an assembler include file. This \
will create a text file with a list of reference. \
Usuly assembler programmers uses the 'fd2offset' \
script.

[B]        XREF   _<funcname>
[B]
   2. C

        You can ask for a C header file. This will create \
a text file with a list of function reference. Because \
the '.fd' files does not describe suffisiantly the \
parameter types, only 'long' and 'void *' are \
used. You may use VERBOSE and edit the resulting \
file to provide the correct types.

[B]      extern long <funcname>(type,type,...);
[B]
   3. PASCAL

        You can ask for a Pascal header file. This will \
create a text file with a list of function references. \
Because the '.fd' files does not describe suffisiantly \
the parameter types, only 'long' and '^long' are \
used. You may use VERBOSE and edit the resulting file \
to provide each function of the correct types.

[B]      extern Function <funcname>(a:type,b:type,...): long;
[B]
   4. OBJECT

        You can ask for an object file. In this case lk \
generates a library (like Amiga.Lib) with each function \
which can be called with a C like call, which means \
that parameters are stacked. You can use the option \
'C' to have the corresponding function calls.
[INDENT]
[LABEL fd2offset][B;5]  . fd2offset
[B;1]
  Creates a library or a header file with the offset \
generated from a description ('.fd') file.
[INDENT 6]
   1. ASM

        You can ask for an assembler include file. This \
will create a text file with a list of offset.

[B]      _LVO<funcname>   =   <offset>
[B]
   2. C

        You can ask for a C header file. This will create \
a text file with a list of #define.

[B]      #define _LVO<funcname>       <offset>
[B]

   3. PASCAL

        You can ask for a PASCAL header file. This will \
create a text file with a list of constants.

[B]      const _LVO<funcname> = <offset>;
[B]

   4. OBJECT

        You can ask for an object file. In this case lk \
generates a library (not like Amiga.Lib) with each \
function offset defined as an XDEF. The correspong \
assembler programme would be:

            XDEF  _LVO<funcname>
      _LVO<funcname>     =   <offset>

  See also:
[L;3][LINK with]		    WITH
[LINK paths]			    WITHPATH
